package com.ruoyi.common.pms.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.pms.entity.YytShopNotice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 店铺公告Mapper
 *
 * @author tanxingxian
 * @date 2021-12-23 15:55
 */
@Repository
public interface YytShopNoticeMapper extends BaseMapper<YytShopNotice> {

    /**
     * 获取店铺公告内容列表
     */
    @Select("select content from yyt_shop_notice where shop_id = #{shopId} and state = 0 and del_flag = '0' order by sort")
    List<String> getNotices(@Param("shopId") String shopId);
}
